<?php
namespace app\index\validate;

use think\Validate;

class Novel extends Validate
{
    protected $rule = [
        'nid' => 'require|gt:0',
        'chapter_no' => 'require|gt:0'
    ];

    protected $message = [
        'nid.require'           => '书籍Id不能为空',
        'nid.gt'                => '书籍Id不能为空',
        'chapter_no.require'    => '章节序号不能为空',
        'chapter_no.gt'         => '章节序号不能为空',
    ];

    protected $scene = [
        'detail'   => ['nid'],
        'content'  => ['nid']
    ];
}